setTextBaselineShift

abstract fun setTextBaselineShift(block: DesignBlock, baselineShift: Float, from: Int = -1, to: Int = -1)

Sets the baseline shift for a grapheme range. Moves the glyphs of the range up from the baseline, or down for a negative value. The line height does not change. Required scope: "text/character" Experimental: this API may change in a minor release.

Parameters

block

the text block whose baseline shift should be changed.

baselineShift

the vertical offset in design units. Positive values move the glyphs up. Must be finite.

from

the start index of the grapheme range. Negative falls back to the current cursor/selection start when editing, or the start of the entire text otherwise.

to

the grapheme index after the last grapheme. Negative falls back to the current cursor/selection end when editing, or the end of the entire text otherwise.